<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
	<head>
	 <base href="<%=basePath%>">
		<link href="themes/css/ui.common.css" rel="stylesheet"
			type="text/css" />
		<link href="themes/css/ui.child.css" rel="stylesheet"
			type="text/css" />
		<link href="themes/css/ui.tips.css" rel="stylesheet"
			type="text/css" />
		<link href="style/jquery_ui/jquery-ui-1.8.custom.css"
			rel="stylesheet" type="text/css" />
    <link id="skin_css" rel="stylesheet" type="text/css" href=" themes/css/ui.c.blue.css" />
    <script src=" Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src=" Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
    <script src=" Scripts/jquery.json-2.2.min.js" type="text/javascript"></script>
 
    <script src=" Scripts/ui.admincp.js" type="text/javascript" charset="UTF-8"></script>
    <script src=" Scripts/ui.tips.js" type="text/javascript"></script>
    <script src=" Scripts/ui.default.js" type="text/javascript" charset="UTF-8"></script>
 
	<script type="text/javascript" src="Scripts/ui.clientDateHelper.js"></script>

	<script type="text/javascript"
			src="Scripts/ui.dialogFormHelper.js"></script>
	<SCRIPT type="text/javascript">
			var searching = false;
				$(function(){
					$("#link_page_prev,#link_page_next").click(function(){
			    		var currentPage = $(this).attr("currentPage");
			    	 
			    		goToPage(currentPage);
			    	}); 
			    	
			    	$("#searchButton").click(function(){
						searching=true;
			    		goToPage(1);
			    	});
			    	
			    	initSearch();
			    	registeRowFuncButton();
				});
				
				function initSearch()
				{
				    $("#search_title").val();
				    $("#search_publishTime").val();
				    $("#search_staffName").val();
				    $("#search_categoryId").val();
				}
			 
				function goToPage(currentPage)
				{
				    var title = $.trim($("#search_title").val());
				    var publishTime = $.trim($("#search_publishTime").val());
				    var staffName = $.trim($("#search_staffName").val());
				    var categoryId = $.trim($("#search_categoryId").val());
					location.href = "regulationInfo!toShowRegulation.action?currpage="+currentPage+"&categoryId="+categoryId+"&title="+title+"&staffName="+staffName+"&publishTime="+publishTime;
				}
	</SCRIPT>
	<script type="text/javascript">
	 
        $(function () {
            $(".ui-news-title").click(function () {
                if( $(this).attr("current")=="true")
                {
                 	 var content =  $(this).next(".ui-news-content").slideToggle();
                }else
                {
                    $(".ui-news-title").attr("current","false");
                   	$(".ui-news-content").slideUp();
                    $(this).attr("current","true");
                   	$(this).next(".ui-news-content").slideDown();
                }
               
          	 });
 
        });
    </script>
    <style type="text/css">
        body
        {
            font-size: 12px;
        }
        
        .ui-news-title
        {
            background-color: #C8D6EF;
            cursor: hand;
            padding: 5px;
            text-align: right;
        }
        
        .ui-news-innerTitle
        {
            float: left;
            overflow: hidden;
        }
        
        .ui-news-content
        {
            text-indent: 26px;
            background-color: #CFDFF7;
            padding: 5px;
            display:none;
        }
        
        .ui-news-barnar
        {
        }
        
        .ui-news-entity
        {
            border-bottom: 1px dashed #EFFBF5;
        }
        
        .ui-news-entity-title
        {
            padding: 5px;
            font-size: larger;
        }
        
        .ui-news-postor
        {
        	font-weight:bolder;
        }
        
        #ui-news-latestList
        {
            width: 100%;
        }
    </style>
</head>
	<body>
	<div class="PageChild_Title">
			<img src=" themes/images/default/icons/archives.png"
				class="PageChild_Tbtnpic" />
			<span class="PageChild_separate"></span>
			<span class="PageChild_TbtnText"><h2>
					规章制度列表
				</h2>
			</span>
			<span class="PageChild_separate"></span>
			<div id="marker" class="red-tips">
			</div>
			<div class="clear">
			</div>
	</div>
		<!-- 搜索栏 -->
		<div class="PageChild_Where">
			<table style="height: 60px;" border="0" cellpadding="0"
				cellspacing="0">
				<tr>
					<td class="mtd">
						规章制度类型:<s:select list="categoryList" listKey="categoryId" listValue="categoryName" headerKey="" headerValue="-请选择-" id="search_categoryId" name="categoryId" theme="simple"></s:select>
					</td>
					<td class="mtd">
						&nbsp;规章制度标题:<input id="search_title" value="${title }">
					</td>
					<td class="mtd">
						&nbsp;发布时间:<input id="search_publishTime" class="NeedDate" value="${publishTime }">
					</td>
					<td class="mtd">
						&nbsp;发布人:<input id="search_staffName" value="${staffName }">
					</td>
					<td>
						<input type="submit" name="btn_Serach" value="搜索" id="btn_Serach" class="o-btn" style="font-size:12px" onclick="goToPage(1)" />
					</td>
				</tr>

				<tr>
					<td colspan="5">
						&nbsp;
						<span id="lbl_list_count">共搜索到 <b>${count}</b> 条符合条件的记录。</span>
					</td>
				</tr>
			</table>
		</div>
		<!-- 搜索栏结束 -->
		<div id="ui-news-latestList">
			<s:if test="infoList != null && infoList.size != 0">
			<s:iterator value="infoList" var="item" status="no">
        	<div class="ui-news-entity">
            	<div class="ui-news-title" current="false" title="展开/关闭详情..">
                <span class="ui-news-innerTitle"><s:property value="#no.count" />. ${item.title}</span><span class="ui-news-barnar" title="发布时间">${item.strPublishTime}</span>
         		</div><div class="ui-news-content">
      			${item.strContent }
      			<br/><br/>
      			<div class="ui-news-postor"><span title="发布人">稿件由 ${item.staffInfo.archiveInfo.staffName} 编辑</span>&nbsp;&nbsp;&nbsp;<span title="规章制度类型">规章制度类型：${item.regulationCategory.categoryName}</span></div>
      			</div>
            </div>
            </s:iterator>
            </s:if><s:else>
            	<div class="ui-news-entity">
            	<div class="ui-news-title" current="false" title="展开/关闭详情..">
                <span class="ui-news-innerTitle"></span>
         		</div><div class="ui-news-content">暂无记录
      			</div>
            </div>
            </s:else>
        </div>

		<!--分页导航开始-->
		<div id="divTopPageNavi" class="list_r_title_text3">
				<!--分页导航开始-->
				<s:if test="currpage<=1">
					<span class='list_r_title_text3a'> <img
							src="themes/images/default/page_up_gray.gif"></img>
					</span>

				</s:if>
				<s:else>
					<span class='list_r_title_text3a'> <a name="link_page_prev"
						id="link_page_prev" href="javascript:void(0);"
						currentPage="${currpage-1}"> <img
								src="themes/images/default/page_up.gif"></img>
					</a> </span>
				</s:else>
				<span class='list_r_title_text3b'> 第${currpage
					}页/共${totalpage }页 </span>
				<s:if test="currpage>=totalpage">
					<span class='list_r_title_text3a'> <img
							src="themes/images/default/page_down_gray.gif"></img>
					</span>
				</s:if>
				<s:else>
					<span class='list_r_title_text3a'> <a name="link_page_next"
						id="link_page_next" href="javascript:void(0);"
						currentPage="${currpage+1 }"> <img
								src="themes/images/default/page_down.gif"></img>
					</a> </span>
				</s:else><span id="goToPageTextArea"><input type="text" id="goPageNum" class="easyui-numberbox" id="goPageNum" max="${totalpage}" min="1"/> <input type="button" id="turnToPageButton" value="GO"/></span>
			</div>
		<!--分页导航结束-->
		<div align="center">
			<input type="button"  class="o-btn" value="返回登陆" onclick='location="login!login.action"'>
		</div>
	</body>
</html>
